set BUILD_DIR=.\TestBundle
set DIST_DIR=dist
set EXECUTOR=.\%DIST_DIR%\AirBackupRunner.exe
set BUNDLE_NAME=%DATE:~7,2%.%DATE:~4,2%.%DATE:~-4%.7z

rmdir %BUILD_DIR% /S /Q
mkdir %BUILD_DIR%
del %BUNDLE_NAME%

call python AirBackupBuilder.py py2exe -d %BUILD_DIR%\%DIST_DIR%
rmdir build /S /Q

FOR %%A IN (Firefox Chrome Ie) DO (
    echo call %EXECUTOR% -o . -d %%A >> %BUILD_DIR%\%%A.bat
    echo pause >> %BUILD_DIR%\%%A.bat
)

7z a -r %BUNDLE_NAME% %BUILD_DIR%